// UPhoneV2Dll.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "..\UsbPhoneBoxLib\Protocol\WJProtocol.h"

#pragma comment(lib,"hid.lib")
#pragma comment(lib,"setupapi.lib")

BOOL hi_InitUsbPnpMsgWnd();
void hi_UnInitUsbPnpMsgWnd(void);
extern "C" void EndWJUsb(void);
 
BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{    
    switch (ul_reason_for_call)
	{

		case DLL_PROCESS_ATTACH:
            OutputDebugString("---- Usb drvier V1 Dll loading.\n");
            
#if VENDOR_EPHONE
            hi_InitUsbPnpMsgWnd();
#endif /*VENDOR_EPHONE*/
            break;
		case DLL_THREAD_ATTACH:
            
            break;
		case DLL_THREAD_DETACH:
            //OutputDebugString("---- Dll thread detatch.\n");
            break;
		case DLL_PROCESS_DETACH:
            OutputDebugString("---- Usb drvier Dll unload\n");
            EndWJUsb();
#if VENDOR_EPHONE
            hi_UnInitUsbPnpMsgWnd();
#endif /*VENDOR_EPHONE*/


			break;
    }
    return TRUE;
} 
/*

// This is an example of an exported variable
WJPROTOCOL_API int nUPhoneV2Dll=0;

// This is an example of an exported function.
WJPROTOCOL_API int fnUPhoneV2Dll(void)
{
	return 42;
}
*/